import Axios, { downLoadFile } from '@/utils/request';
import { StrategyCheckDTO, StrategySettingDTO } from '../vo/password-strategy';

export default class API {
    /**
     * 获取密码策略信息
     * @returns
     */
    static queryPasswordStrategy(): Promise<StrategySettingDTO> {
        return Axios.get('/cache/queryPasswordStrategy');
    }

    /**
     * 更新密码策略信息
     * @returns
     */
    static updatePasswordStrategy(data: StrategySettingDTO): Promise<any> {
        return Axios.post('/cache/updatePasswordStrategy', data);
    }

    /**
     * 用户策略复核列表
     * @returns
     */
    static strategyCheckList(data: StrategyCheckDTO): Promise<any> {
        return Axios.post('/strategy/manage/check', data);
    }

    /**
     * 复核通过
     * @returns
     */
    static checkPass(data: { userCodes: string[]; checkReason: string }): Promise<any> {
        return Axios.post('/strategy/check/pass', data);
    }

    /**
     * 复核拒绝
     * @returns
     */
    static checkRefuse(data: { userCodes: string[]; checkReason: string }): Promise<any> {
        return Axios.post('/strategy/check/refuse', data);
    }

    /**
     * 获取复核比对差异
     * @returns
     */
    static comparionRecord(data: { userCodes: string[] }): Promise<any> {
        return Axios.post('/strategy/comparion/record', data);
    }
}
